package com.shicijiaoliu.pojo;


import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class Shicitabel {

  private String author;
  @NotNull
  @Pattern(regexp = "^\\S{1,20}$") //题目1到20个字
  private String title;
  @NotNull
  private String paragraphs;
  private String subject;
  private String dynasty;
  private long authorId;
  private long idS;
  private LocalDateTime createTime;
  private LocalDateTime updateTime;

  public Shicitabel(String addauthor, String addtitle, String addpara, String addsubject, String adddynasty,long addId) {
    this.author = addauthor;
    this.title = addtitle;
    this.paragraphs = addpara;
    this.subject = addsubject;
    this.dynasty = adddynasty;
    this.idS = addId;

  }

  public Shicitabel(String addauthor, String addtitle, String addpara, String addsubject, String adddynasty) {
    this.author = addauthor;
    this.title = addtitle;
    this.paragraphs = addpara;
    this.subject = addsubject;
    this.dynasty = adddynasty;

  }

  public Shicitabel(){}
}
